home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global comeHome
- updateStage()
- end
-
- on stopMovie
- end
-
- on simpleButton whereToGoOrWhatToDo
- set mouseDownTime to the timer
- set buttonOriginalV to the locV of sprite the clickOn
- set buttonOriginalH to the locH of sprite the clickOn
- set buttonNewV to the locV of sprite the clickOn + 1
- set buttonNewH to the locH of sprite the clickOn + 1
- set the puppet of sprite the clickOn to 1
- set the locV of sprite the clickOn to buttonNewV
- set the locH of sprite the clickOn to buttonNewH
- set the puppet of sprite the clickOn to 0
- updateStage()
- repeat while the stillDown
- if rollOver(the clickOn) then
- set the puppet of sprite the clickOn to 1
- set the locV of sprite the clickOn to buttonNewV
- set the locH of sprite the clickOn to buttonNewH
- set the puppet of sprite the clickOn to 0
- updateStage()
- next repeat
- end if
- set the puppet of sprite the clickOn to 1
- set the locV of sprite the clickOn to buttonOriginalV
- set the locH of sprite the clickOn to buttonOriginalH
- set the puppet of sprite the clickOn to 0
- updateStage()
- end repeat
- repeat while (mouseDownTime + 7) > the timer
- nothing()
- end repeat
- set the puppet of sprite the clickOn to 1
- set the locV of sprite the clickOn to buttonOriginalV
- set the locH of sprite the clickOn to buttonOriginalH
- set the puppet of sprite the clickOn to 0
- updateStage()
- if rollOver(the clickOn) then
- if stringp(whereToGoOrWhatToDo) then
- if the labelList contains whereToGoOrWhatToDo then
- go(whereToGoOrWhatToDo)
- else
- do(whereToGoOrWhatToDo)
- end if
- end if
- end if
- end
-
- on oldthreeDbutton whereToGoOrWhatToDo
- set mouseDownTime to the timer
- set originalCastNum to the castNum of sprite the clickOn
- set newCastNum to the castNum of sprite the clickOn + 1
- set the puppet of sprite the clickOn to 1
- set the castNum of sprite the clickOn to newCastNum
- puppetSound("button down")
- updateStage()
- set lastSoundPlayed to "down sound"
- repeat while the stillDown
- if rollOver(the clickOn) then
- set the castNum of sprite the clickOn to newCastNum
- updateStage()
- if lastSoundPlayed = "down sound" then
- nothing()
- else
- if lastSoundPlayed = "up sound" then
- puppetSound("button down")
- set lastSoundPlayed to "down sound"
- end if
- end if
- next repeat
- end if
- if not rollOver(the clickOn) then
- set the castNum of sprite the clickOn to originalCastNum
- updateStage()
- if lastSoundPlayed = "up sound" then
- nothing()
- next repeat
- end if
- if lastSoundPlayed = "down sound" then
- puppetSound("button up")
- set lastSoundPlayed to "up sound"
- end if
- end if
- end repeat
- repeat while (mouseDownTime + 5) > the timer
- nothing()
- end repeat
- set the castNum of sprite the clickOn to originalCastNum
- set the puppet of sprite the clickOn to 0
- updateStage()
- if lastSoundPlayed = "up sound" then
- nothing()
- else
- if lastSoundPlayed = "down sound" then
- puppetSound("button up")
- set lastSoundPlayed to "up sound"
- end if
- end if
- if rollOver(the clickOn) then
- if stringp(whereToGoOrWhatToDo) then
- if the labelList contains whereToGoOrWhatToDo then
- go(whereToGoOrWhatToDo)
- else
- do(whereToGoOrWhatToDo)
- end if
- end if
- end if
- end
-
- on threeDButton whereToGoOrWhatToDo
- set mouseDownTime to the timer
- set buttonOriginalCast to the castNum of sprite the clickOn
- set buttonNewCast to the castNum of sprite the clickOn + 1
- set the puppet of sprite the clickOn to 1
- set the castNum of sprite the clickOn to buttonNewCast
- set the puppet of sprite the clickOn to 0
- updateStage()
- repeat while the stillDown
- if rollOver(the clickOn) then
- set the puppet of sprite the clickOn to 1
- set the castNum of sprite the clickOn to buttonNewCast
- set the puppet of sprite the clickOn to 0
- updateStage()
- next repeat
- end if
- set the puppet of sprite the clickOn to 1
- set the castNum of sprite the clickOn to buttonOriginalCast
- set the puppet of sprite the clickOn to 0
- updateStage()
- end repeat
- repeat while (mouseDownTime + 7) > the timer
- nothing()
- end repeat
- set the puppet of sprite the clickOn to 1
- set the castNum of sprite the clickOn to buttonOriginalCast
- set the puppet of sprite the clickOn to 0
- updateStage()
- if rollOver(the clickOn) then
- if stringp(whereToGoOrWhatToDo) then
- if the labelList contains whereToGoOrWhatToDo then
- cursor(4)
- go(whereToGoOrWhatToDo)
- else
- do(whereToGoOrWhatToDo)
- end if
- end if
- end if
- end
-
- on startScroller graphic, quartetStart, speed
- global scrollerOn, graphicSprite, qSprite, scrollSpeed
- set graphicSprite to graphic
- set qSprite to quartetStart
- set scrollSpeed to speed
- puppetSprite(graphicSprite, 1)
- repeat with i = qSprite to qSprite + 3
- puppetSprite(i, 1)
- end repeat
- set the scriptText of cast the castNum of sprite qSprite to the text of cast the number of cast "sDown"
- set the scriptText of cast the castNum of sprite (qSprite + 1) to the text of cast the number of cast "sUp"
- set the scriptText of cast the castNum of sprite (qSprite + 2) to the text of cast the number of cast "sTrack"
- set the scriptText of cast the castNum of sprite (qSprite + 3) to the text of cast the number of cast "sThumb"
- updateStage()
- set scrollerOn to 1
- end
-
- on stopScroller
- global scrollerOn, comeHome, graphicSprite, qSprite, scrollSpeed
- set comeHome to marker(0)
- if scrollerOn then
- puppetSprite(graphicSprite, 0)
- repeat with i = qSprite to qSprite + 3
- puppetSprite(i, 0)
- end repeat
- set the scriptText of cast the castNum of sprite qSprite to EMPTY
- set the scriptText of cast the castNum of sprite (qSprite + 1) to EMPTY
- set the scriptText of cast the castNum of sprite (qSprite + 2) to EMPTY
- set the scriptText of cast the castNum of sprite (qSprite + 3) to EMPTY
- set graphicSprite to 0
- set qSprite to 0
- set scrollSpeed to 0
- set scrollerOn to 0
- end if
- end
-
- on scrollGraphic scrollDirection
- global graphicSprite, scrollSpeed
- set firstTimeThrough to 1
- set insideSlopRect to 1
- set done to 0
- set clickOnCastNum to the castNum of sprite the clickOn
- repeat while the stillDown
- if firstTimeThrough then
- set the castNum of sprite the clickOn to clickOnCastNum + 1
- updateStage()
- if scrollDirection = "up" then
- set upOrDown to "down"
- else
- set upOrDown to "up"
- end if
- set firstTimeThrough to 0
- end if
- if insideSlopRect and not rollOver(the clickOn) then
- set the castNum of sprite the clickOn to clickOnCastNum
- updateStage()
- set insideSlopRect to 0
- end if
- if not insideSlopRect and rollOver(the clickOn) then
- set the castNum of sprite the clickOn to clickOnCastNum + 1
- updateStage()
- set insideSlopRect to 1
- end if
- if insideSlopRect then
- if not done then
- putGraphic(upOrDown, scrollSpeed)
- set done to the result
- end if
- end if
- end repeat
- if insideSlopRect then
- set the castNum of sprite the clickOn to clickOnCastNum
- updateStage()
- end if
- end
-
- on moveGraphic
- global graphicSprite, qSprite
- set slopRect to 25
- set clickOnCastNum to the castNum of sprite the clickOn
- set offsetV to the mouseV - the locV of sprite the clickOn
- set startV to the locV of sprite (qSprite + 3)
- set topOff to the locV of sprite the clickOn - the top of sprite the clickOn
- set topV to the top of sprite (qSprite + 2) + topOff
- set botOff to the bottom of sprite the clickOn - the locV of sprite the clickOn
- set botV to the bottom of sprite (qSprite + 2) - botOff
- set firstTimeThrough to 1
- set insideSlopRect to 1
- set done to 0
- repeat while the stillDown
- if firstTimeThrough then
- set the castNum of sprite the clickOn to clickOnCastNum + 1
- updateStage()
- set firstTimeThrough to 0
- end if
- set rollOverQ to 0
- if not rollOver(qSprite + 2) then
- if (the mouseH > (the left of sprite (qSprite + 3) - slopRect)) and (the mouseH < (the right of sprite (qSprite + 3) + slopRect)) then
- set rollOverQ to 1
- end if
- else
- set rollOverQ to 1
- end if
- if insideSlopRect and not rollOverQ then
- set the castNum of sprite the clickOn to clickOnCastNum
- updateStage()
- set insideSlopRect to 0
- end if
- if not insideSlopRect and rollOverQ then
- set the castNum of sprite the clickOn to clickOnCastNum + 1
- updateStage()
- set insideSlopRect to 1
- end if
- if insideSlopRect then
- set newV to the mouseV - offsetV
- if newV > botV then
- set newV to botV
- end if
- if newV < topV then
- set newV to topV
- end if
- set the locV of sprite the clickOn to newV
- updateStage()
- end if
- end repeat
- if insideSlopRect then
- set the castNum of sprite the clickOn to clickOnCastNum
- positionGraphic()
- else
- set the locV of sprite (qSprite + 3) to startV
- updateStage()
- end if
- end
-
- on oldmoveGraphic
- global graphicSprite, qSprite
- set slopRect to 25
- set offsetV to the mouseV - the locV of sprite the clickOn
- set startV to the locV of sprite (qSprite + 3)
- set topOff to the locV of sprite the clickOn - the top of sprite the clickOn
- set topV to the top of sprite (qSprite + 2) + topOff
- set botOff to the bottom of sprite the clickOn - the locV of sprite the clickOn
- set botV to the bottom of sprite (qSprite + 2) - botOff
- set firstTimeThrough to 1
- set insideSlopRect to 1
- set done to 0
- repeat while the stillDown
- if firstTimeThrough then
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- updateStage()
- set firstTimeThrough to 0
- end if
- set rollOverQ to 0
- if not rollOver(qSprite + 2) then
- if (the mouseH > (the left of sprite (qSprite + 3) - slopRect)) and (the mouseH < (the right of sprite (qSprite + 3) + slopRect)) then
- set rollOverQ to 1
- end if
- else
- set rollOverQ to 1
- end if
- if insideSlopRect and not rollOverQ then
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn - 1
- updateStage()
- set insideSlopRect to 0
- end if
- if not insideSlopRect and rollOverQ then
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn + 1
- updateStage()
- set insideSlopRect to 1
- end if
- if insideSlopRect then
- set newV to the mouseV - offsetV
- if newV > botV then
- set newV to botV
- end if
- if newV < topV then
- set newV to topV
- end if
- set the locV of sprite the clickOn to newV
- updateStage()
- end if
- end repeat
- if insideSlopRect then
- set the castNum of sprite the clickOn to the castNum of sprite the clickOn - 1
- positionGraphic()
- else
- set the locV of sprite (qSprite + 3) to startV
- updateStage()
- end if
- end
-
- on pageGraphic
- global graphicSprite, qSprite
- set firstTimeThrough to 1
- set insideSlopRect to 1
- set done to 0
- repeat while the stillDown
- if firstTimeThrough then
- if the mouseV < the top of sprite (qSprite + 3) then
- set upOrDown to "up"
- else
- if the mouseV > the top of sprite (qSprite + 3) then
- set upOrDown to "down"
- else
- exit repeat
- end if
- end if
- set increment to the bottom of sprite (qSprite + 1) - the top of sprite qSprite - 2
- set firstTimeThrough to 0
- end if
- if upOrDown = "up" then
- if the mouseV >= the top of sprite (qSprite + 3) then
- set done to 1
- else
- set done to 0
- end if
- else
- if upOrDown = "down" then
- if the mouseV <= the top of sprite (qSprite + 3) then
- set done to 1
- else
- set done to 0
- end if
- else
- nothing()
- end if
- end if
- if insideSlopRect and not rollOver(the clickOn) then
- set insideSlopRect to 0
- end if
- if not insideSlopRect and rollOver(the clickOn) then
- set insideSlopRect to 1
- end if
- if insideSlopRect then
- if not done then
- putGraphic(upOrDown, increment)
- set done to the result
- updateStage()
- set time to the timer
- repeat while the timer < (time + 15)
- nothing()
- end repeat
- end if
- end if
- end repeat
- end
-
- on putGraphic upOrDown, movePixels
- global graphicSprite, qSprite, startV
- set done to 0
- if upOrDown = "down" then
- set rem to the bottom of sprite graphicSprite - the bottom of sprite (qSprite + 1)
- if rem > movePixels then
- set the locV of sprite graphicSprite to the locV of sprite graphicSprite - movePixels
- else
- set the locV of sprite graphicSprite to the locV of sprite graphicSprite - rem
- set done to 1
- end if
- updateStage()
- positionThumbWheel()
- end if
- if upOrDown = "up" then
- set rem to the top of sprite qSprite - the top of sprite graphicSprite
- if rem > movePixels then
- set the locV of sprite graphicSprite to the locV of sprite graphicSprite + movePixels
- else
- set the locV of sprite graphicSprite to the locV of sprite graphicSprite + rem
- set done to 1
- end if
- updateStage()
- positionThumbWheel()
- end if
- return done
- end
-
- on positionThumbWheel
- global graphicSprite, qSprite
- set track to the height of sprite (qSprite + 2)
- set thumb to the height of sprite (qSprite + 3)
- set thumbOffset to the locV of sprite (qSprite + 3) - the top of sprite (qSprite + 3)
- set freeTrack to track - thumb
- set graphicShowing to the bottom of sprite (qSprite + 1) - the top of sprite qSprite
- set excessGraphic to the height of sprite graphicSprite - graphicShowing
- if (the top of sprite qSprite - the top of sprite graphicSprite) < excessGraphic then
- set graphicPos to (the top of sprite qSprite - the top of sprite graphicSprite) / (excessGraphic * 1.0)
- else
- set graphicPos to 1.0
- end if
- set thumbV to the top of sprite (qSprite + 2) + (graphicPos * freeTrack)
- set the locV of sprite (qSprite + 3) to thumbV + thumbOffset
- updateStage()
- end
-
- on positionGraphic
- global graphicSprite, qSprite
- set track to the height of sprite (qSprite + 2)
- set thumb to the height of sprite (qSprite + 3)
- set freeTrack to track - thumb
- set graphicShowing to the bottom of sprite (qSprite + 1) - the top of sprite qSprite
- set excessGraphic to the height of sprite graphicSprite - graphicShowing
- set graphicOffset to the locV of sprite graphicSprite - the top of sprite graphicSprite
- if (the top of sprite (qSprite + 3) - the top of sprite (qSprite + 2)) < freeTrack then
- set thumbPos to (the top of sprite (qSprite + 3) - the top of sprite (qSprite + 2)) / (freeTrack * 1.0)
- else
- set thumbPos to 1.0
- end if
- set graphicV to the top of sprite qSprite - (thumbPos * excessGraphic)
- set the locV of sprite graphicSprite to graphicV + graphicOffset
- updateStage()
- end
-